<?php defined('In33hao') or exit('Access Invalid!');?>

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>自助开店</h3>
                <h5>编辑和删除已开通自助开店的店铺</h5>
            </div>
        </div>
    </div>
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
            <h4 title=""></h4>
            <span id="explanationZoom" title=""></span> </div>
        <ul>
            <li></li>
        </ul>
    </div>
    <div id="flexigrid"></div>
</div>
<script type="text/javascript">
    $(function(){
        $("#flexigrid").flexigrid({
            url: 'index.php?act=auto_store&op=storelist',
            colModel : [
                {display: '操作', name : 'operation', width : 150, sortable : false, align: 'center', className: 'handle'},
                {display: '套餐ID', name : 'goods_id', width : 40, sortable : true, align: 'left'},
                {display: '会员账号', name : 'member_name', width : 120, sortable : true, align: 'left'},
                {display: '套餐名称', name : 'goods_name', width : 120, sortable : true, align: 'center'},
            ],
            searchitems : [
                {display: '套餐ID', name : 'pack_id'},
                {display: '套餐名称', name : 'pack_name'},
            ],
            sortname: "goods_id",
            sortorder: "asc",
            title: '类型列表'
        });
    });

    function fg_del(id) {
        if(confirm('删除后将不能恢复，确认删除这项吗？')){
            $.getJSON('index.php?act=type&op=type_del', {id:id}, function(data){
                if (data.state) {
                    $("#flexigrid").flexReload();
                } else {
                    showError(data.msg)
                }
            });
        }
    }
</script>